<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
<link rel="stylesheet" href="../css/admin.css" />
<script type="text/javascript" src="../js/cal/jquery-1.7.js">
	
</script>
</head>
<body>
<div>
	<form action="UserServlet?action=search" method="post">
	<div id="search">
		查找方式：<select name="column">
			<option value="username">用户名</option>
			<option value="realname">真实姓名</option>
			<option value="usertype">用户类别</option>
		</select>
		关键字：<input type="text" name="value" />
		<input type="submit" value="查询" />
		&nbsp;&nbsp;
		<a href="userAdd.jsp">添加活动项目</a>
		&nbsp;
		<a href="UserServlet?action=list">查看</a>
		&nbsp;
		<a href="main.jsp">返回</a>
	</div>
	</form>
	<table border="1">
		
		<tr>
			<th>用户名</th>
			<th>密码</th>
			<th>真实姓名</th>
			<th>用户类别</th>
			<th>操作</th>
		</tr>
		
		<c:forEach items="${userList}" var="user">
			<tr>
				<td><a href="UserServlet?action=find&id=${user.id}&detail=1">${user.username }</a></td>
				<td>${user.password }</td>
				<td>${user.realname }</td>
				<td>${user.usertype }</td>
				<td><a href="UserServlet?action=find&id=${user.id }">编辑</a> &nbsp;&nbsp;<a href="UserServlet?action=delete&id=${user.id }">删除</a></td>
			</tr>
		
		</c:forEach>
		
	</table>
	<div id="footer">${footer}</div>
</div>
</body>
</html>